home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Utilities / Laplace / Projects / parser < prev    next >
Encoding:
Text File  |  1997-01-22  |  1.7 KB  |  239 lines

  1. #LAPLACE 1
  2. #->
  3. if(irandom(10) > 5){sin(a)^2}else{cos(a)+1;1}
  4. #<-
  5. #->
  6. procedure a(b) {1;2;3}
  7. #<-
  8. #->
  9. if (b) {a = 1;} else a = 2;
  10. #<-
  11. #->
  12. while TRUE a = a+1;
  13. #<-
  14. #->
  15. procedure a [a=1,b=2,c=3] 1+2; B=g+1
  16. #<-
  17. #->
  18. $dispprec=2,$dispexp=3,$thicklines=2
  19. #<-
  20. #->
  21. 1+sin(12,2,3,4)+1;
  22. #<-
  23. #->
  24. sin cos tan 6 + 1
  25. #<-
  26. #->
  27. a:=-1e-6
  28. #<-
  29. #->
  30. ((1+ 2)*3 ^ 2)
  31. #<-
  32. #->
  33. sin cos tan 1 + 1
  34. #<-
  35. #->
  36. sin cos tan 6 + 1
  37. #<-
  38. #->
  39. sin()
  40. #<-
  41. #->
  42. a=1;b=2;c=3
  43. #<-
  44. #->
  45. element([1,3,4],3)
  46. #<-
  47. #->
  48. element([1,3,4;1,2,9],1,4)
  49. #<-
  50. #->
  51. rvector([1,3,4;1,2,9],3)
  52. #<-
  53. #->
  54. eqright(eq(2+3,a*2))
  55. #<-
  56. #->
  57. eq(2+3,a*2)
  58. #<-
  59. #->
  60.  
  61. #<-
  62. #->
  63. for ( 0 , irandom(100) > 0 , 1 ) { debug("hallo"); }
  64. #<-
  65. #->
  66.  
  67. #<-
  68. #->
  69. export(eval(matrix(3,3,n,m,n*m)),"Plain")
  70. #<-
  71. #->
  72.  
  73. #<-
  74. #->
  75. a=fopen("laplace:About","r");
  76. #<-
  77. #->
  78. while ( !eof(a) ) { debug(freadln(a)) }
  79. #<-
  80. #->
  81. fclose(a)
  82. #<-
  83. #->
  84. a:=1
  85. #<-
  86. #->
  87. a=2
  88. #<-
  89. #->
  90. showentries
  91. #<-
  92. #->
  93. {a=3;showentries;a=4;showentries;b=9}
  94. #<-
  95. #->
  96. a=3,showentries,a=4,showentries,b=9
  97. #<-
  98. #->
  99. a:=2
  100. #<-
  101. #->
  102. b=a
  103. #<-
  104. #->
  105. eval(b)
  106. #<-
  107. #->
  108. f(x)=x^2
  109. #<-
  110. #->
  111. f(3)
  112. #<-
  113. #->
  114. x=5
  115. #<-
  116. #->
  117. f(x)
  118. #<-
  119. #->
  120. showentries
  121. #<-
  122. #->
  123. g
  124. #<-
  125. #->
  126. const(x)
  127. #<-
  128. #->
  129. x
  130. #<-
  131. #->
  132.  
  133. #<-
  134. #->
  135. break(2,sin);
  136. #<-
  137. #->
  138. return(1);
  139. #<-
  140. #->
  141. sin
  142. #<-
  143. #->
  144.  
  145. #<-
  146. #->
  147. x=4
  148. #<-
  149. #->
  150. f(x,y)=x^3+y
  151. #<-
  152. #->
  153. f
  154. #<-
  155. #->
  156. f(x)
  157. #<-
  158. #->
  159. g(x)=f
  160. #<-
  161. #->
  162. x=2
  163. #<-
  164. #->
  165. f
  166. #<-
  167. #->
  168. $dispprec
  169. #<-
  170. #->
  171. $dispprec=5
  172. #<-
  173. #->
  174. $dispprec
  175. #<-
  176. #->
  177. $thicklines=1
  178. #<-
  179. #->
  180.  
  181. #<-
  182. #->
  183. $thicklines=0
  184. #<-
  185. #->
  186.  
  187. #<-
  188. #->
  189. $prompt="hallo"
  190. #<-
  191. #->
  192.  
  193. #<-
  194. #->
  195. prefsset("debugmode", "hallo")
  196. #<-
  197. #->
  198. prefsget(prefsget("debugmode"))
  199. #<-
  200. #->
  201. interpret(prefsget("profile"))
  202. #<-
  203. #->
  204. prefsset("debugmode", "hello")
  205. #<-
  206. #->
  207. prefsset("debugmode", "hello")
  208. #<-
  209. #->
  210. interpret("2048+2")
  211. #<-
  212. #->
  213.  
  214. #<-
  215. #->
  216. showentries
  217. #<-
  218. #->
  219. a
  220. #<-
  221. #->
  222. a=1
  223. #<-
  224. #->
  225. b=2;c=4
  226. #<-
  227. #->
  228. a
  229. #<-
  230. #->
  231. b
  232. #<-
  233. #->
  234. c
  235. #<-
  236. #->
  237.  
  238. #<-
  239.